<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

session_start();

class Administrator extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		
		$this->load->helper(array('url','cookie','html','language','security','text'));
		$this->load->library(array('parser','session','user_agent','pagination','encrypt'));
		
		$uagent = do_hash($this->agent->browser());
		$platform = do_hash($this->agent->platform());
		
		if($this->agent->is_browser()){
			if(($this->input->cookie('dsn_agent') != $uagent) || ($this->input->cookie('dsn_platform') != $platform)){
				redirect(base_url('error/uagent'));
				exit(0);
			}
		}else{
			redirect(base_url('error/uagent'));
			exit(0);
		}
		
		require_once "./lib/src/skey.php";
		
		if(empty ($uid) || empty ($uname) || empty ($lvl) || ($lvl != 1)){
			redirect(base_url('verify/logout'));
			exit(0);
		}
		
		$this->lang->load('indonesia', 'indonesia');
		$this->load->model('Admin_model','adminmodel',TRUE);	
		
	}
	   
	public function index()
	{
		$this->load->view('admin/index');
	}
	
	public function kategori(){
		$this->load->view('admin/kategori');
	}
	
	public function perusahaan()
	{
		$this->load->view('admin/perusahaan');
	}
	
	public function produk()
	{
		$this->load->view('admin/produk');
	}
	
	public function loker()
	{
		$this->load->view('admin/loker');
	}
	
	public function pengguna()
	{
		$this->load->view('admin/pengguna');
	}
	
	public function masukan()
	{
		$this->load->view('admin/masukan');
	}
	
	public function edit()
	{
		$this->load->view('admin/editprofile');
	}
	
	public function kebijakan()
	{
		$this->load->view('admin/kebijakan');
	}
	
	
}

/* End of file administrator.php */
/* Location: ./application/controllers/administrator.php */
